package com.msmall.community.bbs.service;

import java.util.List;

import com.msmall.base.pager.PaginationSupport;
import com.msmall.base.service.BaseManager;
import com.msmall.community.bbs.model.Board;
import com.msmall.community.bbs.model.BoardKeyword;


public interface BoardManager extends BaseManager<Board, Long>{

	/**
	 * 通过boardid获得此版权下的所有关键字，orders 1,2,3
	 */
	public List<BoardKeyword> getKeywordsByBoardid(Long boardid);
	
	public Board getBoard(Long boardId);
	/**
	 * 保存版区
	 * @param board
	 */
	public void saveBoard(Board board);
	/**
	 * 获得所有的版区
	 */
	public List<Board> getAllBoard();
	
	/**
	 * 获得所有的有效版区
	 */
	public List<Board> getAllAvailableBoard();

	/**
	 * 获得子版区
	 * @param boardId
	 * @return
	 */
	public List<Board> getChildBoard(Long boardId);
	
	/**
	 * 获得某版区的所有主题帖的分页显示
	 * @param boardId
	 */
	public void getTopicPaginationByBoard(PaginationSupport pagination, Long userid, Long boardId, Long keywordid);
	
	/**
	 * 刷新所有数据到缓存
	 */
	public void refresh()throws Exception;
	
	
}
